package rawengine.math;

/** Vector class (using float).
 */

public class Vector2f
{

	
	  /** Vector X. **/
	public float x;
	
	  /** Vector Y. **/
	public float y;
	

	/** Vector2f construtor.
	 *  @param x Vector X.
	 *  @param y Vector Y.
	 */

	public Vector2f(float x, float y)
	{
		setTo(x, y);
	}
	
    /**
     * Cria um novo Vector3f com os mesmo valores do vetor especificado
        
    */
    public Vector2f(Vector2f v) 
	{
        	setTo(v);
        }

    /** Vector3f construtor.
	 */
    public Vector2f()
	{
		this.x = 0.0f;
		this.y = 0.0f;
	}

    public void setTo(Vector2f v) 
	{
        	this.x = v.x;
	        this.y = v.y;
        	        
     }
    
    public void setTo(float x, float y) 
	{
        	this.x = x;
	        this.y = y;
        	

	}
    
    public void setZero()
    {
    	this.x = 0.0f;
		this.y = 0.0f;
		
    
    }
    
    public void negate()
    {
    	this.x = - this.x;
		this.y = - this.y;
		
    }
    
    public String toString()
    {
    	return ("X: " + x + " Y: " + y);
    }
}
    

